package com.lzy.pattern.adapter.class_adapter;

/**
 * @ClassName: Computer
 * @Description: 电脑
 * @Author: LiuZy
 * @Date: 2022/4/23 09:30
 * @Version: 1.0
 */
public class Computer {

    /**
     * 电脑只能读取sd卡
     * @param sdCard
     * @return
     */
    public String readSD(SdCard sdCard){
        if(!(sdCard instanceof SdCard)){
            throw new RuntimeException("不支持该类型存储卡");
        }
        return sdCard.read();
    }
}